package com.xiaopeng.common.secure;


import lombok.Data;
import org.springframework.beans.BeansException;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "desensitization")
public class DesensitizationProperties implements ApplicationContextAware {

    public static  DesensitizationProperties INSTANCE = new DesensitizationProperties();
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        INSTANCE = this;
    }

    /**
     * 新字段后缀名
     */
    private String encryptFieldSuffix = "Encrypt";

    /**
     * 公钥
     */
    private String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwVX4kTRKiI8Q31wVJzzhYx2LtOr9NdLvfILiSTvJvpVfWzpR1SDDGUgc/jdtyfM1I2BMPySXBnJt1OOWgCGBaRm7QLUk1Tn2AkEVldc8AuZ3vYMsCUIgSnrNY294vPE93lt8LCnknsq2GGsmwKRqy44ntJOGtwfOe+3fZ9r9I7WnCKQ74bl2v9AxysujPVWsQd0oxAd1W9IZvjOwxEJfaDjy36ZWIUg33+WLW7V5FdsZN9XyScbUGbVs2E/Jgeo68KTCGUclVtim+sc8oxKxKON/haLBFe1tDqIEX6K3QNYOkLBmNOnyBiOCvfIlRF/+WiEFcZw5q2kUXq8OUYpNhQIDAQAB";

    /**
     * 私钥
     */
    private String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDBVfiRNEqIjxDfXBUnPOFjHYu06v010u98guJJO8m+lV9bOlHVIMMZSBz+N23J8zUjYEw/JJcGcm3U45aAIYFpGbtAtSTVOfYCQRWV1zwC5ne9gywJQiBKes1jb3i88T3eW3wsKeSeyrYYaybApGrLjie0k4a3B8577d9n2v0jtacIpDvhuXa/0DHKy6M9VaxB3SjEB3Vb0hm+M7DEQl9oOPLfplYhSDff5YtbtXkV2xk31fJJxtQZtWzYT8mB6jrwpMIZRyVW2Kb6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